package face.pay.api.terminal.controller;

import face.pay.api.payter.service.IterminalLoginService;
import face.pay.util.ResultMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商户设备登录
 */
@RestController
@RequestMapping("/terminal")
public class TerminalOptApi {

    @Autowired
    IterminalLoginService iterminalLoginService;

    @RequestMapping("/login")
    public ResultMessage login(@RequestBody String loginInfo){
        return  iterminalLoginService.login(loginInfo);
    }

    @RequestMapping("/getInfo")
    public ResultMessage getInfo(@RequestBody String terminalInfo){
        return  iterminalLoginService.getInfo(terminalInfo);
    }

    @RequestMapping("/getValidateCode")
    public ResultMessage getValidateCode(@RequestBody String validateCodeInfo){
        return  iterminalLoginService.getValidateCode(validateCodeInfo);
    }

}
